package org.jeecg.modules.demo.mall.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.demo.weixin.entity.SmtDev;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Description: yx_user
 * @Author: jeecg-boot
 * @Date: 2023-10-24
 * @Version: V1.0
 */
@Data
@TableName("yx_user")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "yx_user对象", description = "yx_user")
public class YxUser implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @TableId
    @Excel(name = "用户id", width = 15)
    @ApiModelProperty(value = "用户id")
    private Integer uid;
    /**
     * 店铺名称
     */
    @Excel(name = "店铺名称", width = 15)
    @ApiModelProperty(value = "店铺名称")
    private String shopName;
    /**
     * 用户账户(跟accout一样)
     */
    @Excel(name = "用户账户(跟accout一样)", width = 15)
    @ApiModelProperty(value = "用户账户(跟accout一样)")
    private String username;
    /**
     * 用户密码（跟pwd）
     */
    @Excel(name = "用户密码（跟pwd）", width = 15)
    @ApiModelProperty(value = "用户密码（跟pwd）")
    private String password;
    /**
     * 设计平台登陆密码
     */
    @Excel(name = "设计平台登陆密码", width = 15)
    @ApiModelProperty(value = "设计平台登陆密码")
    private String pwd;
    /**
     * 真实姓名
     */
    @Excel(name = "真实姓名", width = 15)
    @ApiModelProperty(value = "String realName")
    private String realName;
    /**
     * 生日
     */
    @Excel(name = "生日", width = 15)
    @ApiModelProperty(value = "生日")
    private Integer birthday;
    /**
     * 身份证号码
     */
    @Excel(name = "身份证号码", width = 15)
    @ApiModelProperty(value = "身份证号码")
    private String cardId;
    /**
     * 用户备注
     */
    @Excel(name = "用户备注", width = 15)
    @ApiModelProperty(value = "用户备注")
    private String mark;
    /**
     * 合伙人id
     */
    @Excel(name = "合伙人id", width = 15)
    @ApiModelProperty(value = "合伙人id")
    private Integer partnerId;
    /**
     * 用户分组id
     */
    @Excel(name = "用户分组id", width = 15)
    @ApiModelProperty(value = "用户分组id")
    private Integer groupId;
    /**
     * 用户昵称
     */
    @Excel(name = "用户昵称", width = 15)
    @ApiModelProperty(value = "用户昵称")
    private String nickname;
    /**
     * 用户头像
     */
    @Excel(name = "用户头像", width = 15)
    @ApiModelProperty(value = "用户头像")
    private String avatar;
    /**
     * 手机号码
     */
    @Excel(name = "手机号码", width = 15)
    @ApiModelProperty(value = "手机号码")
    private String phone;
    /**
     * 添加ip
     */
    @Excel(name = "添加ip", width = 15)
    @ApiModelProperty(value = "添加ip")
    private String addIp;
    /**
     * 添加时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "添加时间")
    private Date createTime;
    /**
     * 最后一次登录时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "最后一次登录时间")
    private Date updateTime;
    /**
     * 最后一次登录ip
     */
    @Excel(name = "最后一次登录ip", width = 15)
    @ApiModelProperty(value = "最后一次登录ip")
    private String lastIp;
    /**
     * 用户余额
     */
    @Excel(name = "用户余额", width = 15)
    @ApiModelProperty(value = "用户余额")
    private BigDecimal nowMoney;
    /**
     * 佣金金额
     */
    @Excel(name = "佣金金额", width = 15)
    @ApiModelProperty(value = "佣金金额")
    private BigDecimal brokeragePrice;
    /**
     * 用户剩余积分
     */
    @Excel(name = "用户剩余积分", width = 15)
    @ApiModelProperty(value = "用户剩余积分")
    private BigDecimal integral;
    /**
     * 连续签到天数
     */
    @Excel(name = "连续签到天数", width = 15)
    @ApiModelProperty(value = "连续签到天数")
    private Integer signNum;
    /**
     * 1为正常，0为禁止, 2为游戏设计平台内部使用
     */
    @Dict(dicCode = "Mer_YxUser_status")
    @Excel(name = "1为正常，0为禁止, 2为游戏设计平台内部使用", width = 15)
    @ApiModelProperty(value = "1为正常，0为禁止, 2为游戏设计平台内部使用")
    private Integer status;
    /**
     * 等级
     */
    @Excel(name = "等级", width = 15)
    @ApiModelProperty(value = "等级")
    private Integer level;
    /**
     * 推广元id
     */
    @Excel(name = "推广元id", width = 15)
    @ApiModelProperty(value = "推广元id")
    private Integer spreadUid;
    /**
     * 推广员关联时间
     */
    @Excel(name = "推广员关联时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "推广员关联时间")
    private Date spreadTime;
    /**
     * 用户类型
     */
    @Excel(name = "用户类型", width = 15)
    @ApiModelProperty(value = "用户类型")
    private String userType;
    /**
     * 是否为推广员
     */
    @Excel(name = "是否为推广员", width = 15)
    @ApiModelProperty(value = "是否为推广员")
    private Integer isPromoter;
    /**
     * 用户购买次数
     */
    @Excel(name = "用户购买次数", width = 15)
    @ApiModelProperty(value = "用户购买次数")
    private Integer payCount;
    /**
     * 下级人数
     */
    @Excel(name = "下级人数", width = 15)
    @ApiModelProperty(value = "下级人数")
    private Integer spreadCount;
    /**
     * 详细地址
     */
    @Excel(name = "详细地址", width = 15)
    @ApiModelProperty(value = "详细地址")
    private String addres;
    /**
     * 管理员编号
     */
    @Excel(name = "管理员编号 ", width = 15)
    @ApiModelProperty(value = "管理员编号 ")
    private Integer adminid;
    /**
     * 用户登陆类型，h5,wechat,routine
     */
    @Excel(name = "用户登陆类型，h5,wechat,routine", width = 15)
    @ApiModelProperty(value = "用户登陆类型，h5,wechat,routine")
    private String loginType;
    /**
     * 微信用户json信息
     */
    @Excel(name = "微信用户json信息", width = 15)
    @ApiModelProperty(value = "微信用户json信息")
    private String wxProfile;
    /**
     * isDel
     */
    @Excel(name = "isDel", width = 15)
    @ApiModelProperty(value = "isDel")
    @TableLogic
    private Integer isDel;
    /**
     * 房主累计分数
     */
    @Excel(name = "房主累计分数", width = 15)
    @ApiModelProperty(value = "房主累计分数")
    private Integer integrals;
    /**
     * createBy
     */
    @ApiModelProperty(value = "createBy")
    private Integer createBy;
    /**
     * 用户成长值
     */
    @ApiModelProperty(value = "用户成长值")
    private BigDecimal userGrowthValue;
    /**
     * 商户id
     */
    private Integer merchantId;
    /*-----------------------------------非数据库字段----------------------------------*/
    /**
     * 前端传参商户的id
     */
    @TableField(exist = false)
    private String merId;

    /**
     * 前端传参商户的名称
     */
    @TableField(exist = false)
    private String merName;

    /**
     * 是否永久
     */
    @TableField(exist = false)
    private Integer isForever;

    /**
     * 享受折扣
     */
    @TableField(exist = false)
    private BigDecimal discount;

    /**
     * 是否通知
     */
    @TableField(exist = false)
    private Integer remind;

    /**
     * 过期时间
     */
    @TableField(exist = false)
    private Integer validTime;

//    /**充值总金额*/
//    @TableField(exist = false)
//    private BigDecimal totalPrice;

//    /**现金支付金额*/
//    @TableField(exist = false)
//    private BigDecimal cashPay;

//    /**订单类型 判断不为null时为储值订单退款逻辑处理*/
//    @TableField(exist = false)
//    private Integer orderTypes;
//    /**
//     * 退款时支付的余额
//     */
//    @TableField(exist = false)
//    private BigDecimal refundBalance;
    /**
     * 次卡数量
     */
    @TableField(exist = false)
    private Integer cartCount;

    /**
     * 等级name
     */
    @TableField(exist = false)
    private String levelName;
    /**
     * 等级id
     */
    @TableField(exist = false)
    private Integer grade;
    /**
     * 绑定商家的用户
     */
    @TableField(exist = false)
    private List<YxUser> userIds;

    /**
     * 优惠券数量
     */
    @TableField(exist = false)
    private Integer couponNum;
    /**
     * 储值卡数量
     */
    @TableField(exist = false)
    private Integer valueNum;
    /**
     * 用户的点卡
     */
    @TableField(exist = false)
    private BigDecimal point;

//    /**
//     * 设备名称
//     */
//    @TableField(exist = false)
//    private String devCode;
//
//
//    /**
//     * 设备名称
//     */
//    @TableField(exist = false)
//    private String devName;



    /**
     * 设备List
     */
    @TableField(exist = false)
    private List<SmtDev> smtDevList;


}
